import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:vmall_app/models/home_carousel.dart';

class HomeSwipper extends StatefulWidget {
  @override
  _HomeSwipperState createState() => _HomeSwipperState();
}

class _HomeSwipperState extends State<HomeSwipper> {
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.all(5),
      height: 120,
      child: Swiper(itemCount: listHomeCarousel.length,
      autoplay: true,
      pagination :SwiperPagination(),
      itemBuilder: (context,index){
        return ClipRRect(
          borderRadius: BorderRadius.circular(5),
          child: Image.network(listHomeCarousel[index].imageUrl,fit:BoxFit.fill));
      },),
    );
  }
}